#!/bin/bash
# Zaitan Module - Emesene Install
# Zaitan Team <http://code.google.com/p/zaitan/>

RMOD_ENGINE='1.0'
RMOD_CATEGORY='Software'
RMOD_SUBCATEGORY='Interface'
RMOD_NAME='Stoq'
RMOD_AUTHOR='Zaitan Team'
RMOD_VERSION='1.0'
RMOD_DESCRIPTION='Installs Emesene'
RMOD_UPDATE_URL='http://code.google.com/p/zaitan/'


# install Emesene



echo Running $RMOD_NAME...
#/usr/lib/zaitan/modulo/mod-checkInstall


# update
echo '
# Install Stoq
deb http://download.stoq.com.br/ubuntu ./ #Stoq' | tee -a /etc/apt/sources.list

gpg --keyserver  wwwkeys.us.pgp.net --recv-keys 537644F2 
gpg -a --export 537644F2 | apt-key add -


apt-get update
apt-get --allow-unauthenticated install stoq
apt-get install postgresql-8.1


-u postgres createuser stoq -drs -P


sed -i -e '/Stoq/d' /etc/apt/sources.list

apt-get update


firefox http://www.stoq.com.br/index.php?option=com_content&task=view&id=37&Itemid=57

echo $RMOD_NAME Finibashed...

##Logs
echo $RMOD_NAME-$RMOD_VERSION | tee -a /usr/share/zaitan/logs
/usr/lib/zaitan/modulo/mod-logs
##

exit 0

